﻿using System;
using GeoAPI.Geometries;
using GeoAPI.IO;

namespace NetTopologySuite.Geometries
{
	public static class GeometryEx
	{
		public static byte[] AsBinary(this IGeometry self, IBinaryGeometryWriter writer)
		{
			if (writer != null)
			{
				return writer.Write(self);
			}
			return self.AsBinary();
		}
	}
}
